<?php
namespace App\Services\WxMass\Filter;
use App\Services\WxMass\FilterFactory;

/**
 * 指定标签ID发送规则
 * @package App\Services\Filter
 */
class FilterTagid extends FilterAbstract
{
    /**
     * 格式化存储数据格式
     * @param $request
     * @return array
     */
    public function formatInput($request)
    {
        $this->inputType = FilterFactory::INPUT_TYPE_TAGID;
        $this->inputTagid = $request->filter_rule['tagid'];
        return $this->formatInputData();
    }

    /**
     * 规则输出格式化
     * @param $rule
     * @return array
     */
    public function formatOutput($rule)
    {
        $this->outputType = FilterFactory::OUTPUT_TYPE_ALL;
        $this->outputTagid = $rule['tagid'];
        return $this->formatOutputData();
    }
}